xen: Rename asprintf() to xasprintf()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sat, 19 Feb 2022 17:15:27 +0000 (17:15 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 21 Feb 2022 18:17:56 +0000 (18:17 +0000)
commit5de332588613ebe339f886488852972a5cc5c4cf
tree23d42f1d8898c02f679e1a163c4883b9e71bf538
parent39bcecb9a8fe25d3a1e372187d6358f25ffb06bb
xen: Rename asprintf() to xasprintf()

Coverity reports that there is a memory leak in
ioreq_server_alloc_rangesets().  This would be true if Xen's implementation of
asprintf() had glibc's return semantics, but it doesn't.

Rename to xasprintf() to reduce confusion for Coverity and other developers.

While at it, fix style issues.  Rearrange ioreq_server_alloc_rangesets() to
use a tabulated switch statement, and not to have a trailing space in the
rangeset name for an unknown range type.

Coverity-ID: 1472735
Coverity-ID: 1500265
Fixes: 780e918a2e54 ("add an implentation of asprintf() for xen")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/ioreq.c
xen/common/vsprintf.c
xen/include/xen/lib.h